package com.ticket.sass.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ticket.sass.common.entity.tenant.FilmScheduleEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;


/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ywb
 * @since 2024-03-06
 */
public interface FilmScheduleMapper extends BaseMapper<FilmScheduleEntity> {
    @Update("update film_schedules set film_id = #{filmId} where film_code = #{filmCode} and cinema_id = #{cinemaId} AND deleted_at IS NULL")
    void updateFilmIdByFilmCodeAndCinemaId(@Param("filmCode") String filmCode, @Param("filmId") Long filmId, @Param("cinemaId") Long cinemaId);
    
    @Update("update film_schedules set hall_id = #{hallId} where hall_code = #{hallCode} and cinema_id = #{cinemaId} AND deleted_at IS NULL")
    void updateHallIdByHallCodeAndHallId(@Param("hallCode") String filmCode, @Param("hallId") Long filmId, @Param("cinemaId") Long cinemaId);
}
